package com.arron.DesignMode.prototype.deepclone;

import java.io.Serializable;

/**
 * @Classname DeepCloneableTarget
 * @Date 2020/11/6 12:16
 * @Created by 刘
 */
public class DeepCloneableTarget implements Serializable ,Cloneable{

    private String name;

    public DeepCloneableTarget(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "DeepCloneableTarget{" +
                "name='" + name + '\'' +
                '}';
    }

    @Override
    protected DeepCloneableTarget clone() throws CloneNotSupportedException {
        return (DeepCloneableTarget)super.clone();
    }
}
